package com.castlzl.random.config;

import lombok.Data;

/**
 * @author leiziliang
 * @version 1.0
 * @date 2025/2/27 10:10 PM
 */
@Data
public class RandomIdProperties {

    private String type = "snowflake";

    /**
     * 号段存储类型，tinyID和leaf需要用到，参数有redis和zookeeper
     */
    private String segmentStorageType = "redis";

    // Snowflake properties
    private long workerId = 0;
    private long datacenterId = 0;

    // Leaf segment properties
    private String bizTag = "default";
    private long step = 1000;
    private String keyPrefix = "leaf:segment:";
    private boolean asyncLoadingSegment = true;

    // Uid properties
    private int seqBits = 12;

    // Tiny properties
    private String bizType = "default";

    // zookeeper properties
    private String namespace = "random-id";
    private String pathPrefix = "segment";


}
